package com.jxsr.controller;


import com.alibaba.fastjson.JSONObject;
import com.jxsr.util.HttpUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
public class TestController {
    @GetMapping("/search")
    public void test(String number) {
        HashMap<String, String> stringStringHashMap = new HashMap<>();
        // 请求参数
        stringStringHashMap.put("number", number);
        String url = "http://127.0.0.1:8080/d/v1/getLocation";
        String res = HttpUtil.doGet(url, stringStringHashMap);
        // 将string转为json
        JSONObject jsonObject = JSONObject.parseObject(res);
    }
}
